package com.mocoop.dao;

import java.util.HashMap;
import java.util.Map;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class SQLiteHelper {
	private static Map<String, SQLiteDatabase> sqLiteDatabase = new HashMap<String, SQLiteDatabase>();

	public static SQLiteDatabase getDataBase(Context context, String dbName) {
		if (sqLiteDatabase.get(dbName) == null) {
			try {
				sqLiteDatabase.put(dbName, context.openOrCreateDatabase(dbName + ".db", Context.MODE_PRIVATE, null));
			} catch (Exception e) {

			}
		}
		return sqLiteDatabase.get(dbName);
	}

}
